var e = require("../../../@babel/runtime/helpers/defineProperty"), t = getApp();

Component({
    properties: {
        datasource: {
            type: Array
        },
        orderType: {
            type: String
        },
        detailUrl: {
            type: String
        },
        status: {
            type: Number
        },
        consolidated: {
            type: Boolean,
            value: !1
        },
        custom_receipt_confirmation_html: {
            type: String,
            value: ""
        }
    },
    data: {
        language: "",
        regional: "请选择快递公司",
        dateshow_1: !1,
        columns: [],
        checkList: [],
        options: [],
        dialogVisible: !1,
        expressName: "",
        numberName: "",
        addresseeInfo: {},
        showQrcode: !1,
        qrcode_url: "",
        sendGoogsFail: {
            show: !1,
            msg: ""
        },
        showID: "",
        jurisdiction_set: 0,
        showBarter: !1,
        showBarter_value: null,
        filterExpressCompanys: [],
        inputExpressCompanyName: "",
        orderPayId: null,
        blindBoxInfo: {
            show: !1,
            goods: []
        },
        refundShow: !1,
        refundText: "",
        custom_receipt_confirmation_show: !1,
        custom_receipt_confirmation_btn: {},
        custom_receipt_confirmation_item: {}
    },
    lifetimes: {
        attached: function() {
            var e = wx.getStorageSync("langIndex");
            this.setData({
                language: e.en
            });
        },
        moved: function() {},
        detached: function() {}
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        filterExpressCompany: function(e) {
            var t = e.detail, r = this.data.columns;
            this.setData({
                filterExpressCompanys: r.filter(function(e) {
                    return -1 !== e.indexOf(t);
                }),
                inputExpressCompanyName: t
            });
        },
        toStore: function(e) {
            var t = e.currentTarget.dataset.order;
            92 == t.plugin_id ? wx.navigateTo({
                url: "/packageA/member/supplier/SupplierShop/SupplierShop?id=" + t.id + "&fromOrder=1"
            }) : 31 == t.plugin_id || 32 == t.plugin_id ? wx.navigateTo({
                url: "/packageC/o2o/o2oStore/o2oStore?store_id=" + t.id + "&fromOrder=1"
            }) : 54 == t.plugin_id && t.has_one_team_member.store_id ? wx.navigateTo({
                url: "/packageC/o2o/o2oStore/o2oStore?store_id=" + t.has_one_team_member.store_id + "&fromHome=1"
            }) : 0 == t.plugin_id && wx.reLaunch({
                url: "/packageG/index/index"
            });
        },
        showMore: function(e) {
            var t = e.currentTarget.dataset.order.order_sn;
            this.data.showID == t ? this.setData({
                showID: ""
            }) : this.setData({
                showID: t
            });
        },
        getTemplate: function(e, r) {
            var a = t.getNetAddresss("member.member.getMiniTemplateCorrespond"), o = this;
            t._getNetWork({
                url: a,
                data: {
                    small_type: 2
                },
                success: function(t) {
                    var a = t.data;
                    if (1 == a.result) {
                        for (var i = [], s = 0; s < a.data.length; s++) i.push(a.data[s].template_id);
                        o.setData({
                            TemplateArray: i
                        }), wx.requestSubscribeMessage({
                            tmplIds: o.data.TemplateArray,
                            success: function(t) {
                                o._toRefund(e, r);
                            },
                            fail: function() {
                                o._toRefund(e, r);
                            }
                        });
                    } else wx.showToast({
                        title: a.msg,
                        icon: "none",
                        duration: 1500
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        multiplePayChange: function(e) {
            this.setData({
                checkList: e.detail
            }), this.triggerEvent("MultiplePayNotification", this.data.checkList);
        },
        goOrderdetail: function(e) {
            var t = this.data.orderType, r = e.currentTarget.dataset.orderid;
            wx.navigateTo({
                url: "/packageA/member/orderdetail/orderdetail?order_id=" + r + "&orderType=" + t
            });
        },
        operation: function(e) {
            var t = e.currentTarget.dataset.item, r = e.currentTarget.dataset.order, a = e.currentTarget.dataset.orderidx;
            if (this.setData({
                orderPayId: r.id
            }), t.api || 41 == t.value) if (8 == t.value || "snatch_regiment_express" == t.value) this._checklogistics(r, t); else if (12 == t.value) this._deleteOrder(r, t, a); else if (51 == t.value) "71" == r.plugin_id && wx.navigateTo({
                url: "/packageH/cpsPwd/cpsPwd?id=" + r.id
            }); else if (10 == t.value) this._comment(r, t); else if (1 == t.value || "snatch_regiment_pay" == t.value) this._toPay(r, t); else if (13 == t.value || "snatch_regiment_refund" == t.value || "54" == t.value) {
                this.getTemplate(r, t);
            } else if (9 == t.value) this._cancleOrder(r, t, a); else if (5 == t.value) this._confirmOrder(r, t); else if (18 == t.value) this._toRefundDetail(r, t); else if ("cashierPay" == t.value) this._cashPayOrder(r, t); else if ("verification_code" == t.value) this._verification(r, t); else if (20 == t.value) this._verificationCash(r, t); else if (21 == t.value) wx.navigateTo({
                url: "/packageD/member/myOrder/order_record/order_record?order_id=" + item.id
            }); else if (22 == t.value) this._payMoney(r, t); else if (101 == t.value) {
                var o = "/packageE/pickUpCard/pickUpCardReimburse/pickUpCardReimburse?orderid=" + r.id;
                "picking-card-one" == this.data.orderType && (o += "&plugin=one"), wx.navigateTo({
                    url: o
                });
            } else if ("coupon" == t.value) console.log(r.id), wx.navigateTo({
                url: "/packageD/coupon_share/coupon_share?orderid=" + r.id
            }); else if (23 == t.value || 60 == t.value) 3 == r.dispatch_type_id ? this.sendGoogs() : (this._getCompany(), 
            this.setData({
                dialogVisible: !0
            })), this.triggerEvent("stoprefresh", !0), this.setData({
                expressName: "",
                numberName: ""
            }); else if (24 == t.value || 61 == t.value) this._deliverGoodsCancel(r, t); else if (25 == t.value) this._collectGoods(r, t); else if (26 == t.value) this._closeOrderPay(r, t); else if (30 == t.value) this._closeOrderPay(r, t, "确定退款关闭订单?"); else if (27 == t.value) this._evaluate(r, t); else if (28 == t.value) this._truckList(t, r); else if (41 == t.value) ; else if (50 == t.value) this._checkInvoice(t, r); else if (11 == t.value) this.confirmHotelOrder(t.api, r.id); else if ("lease_toy_refund" == t.value || "package_deliver_clerk" == t.value) console.log("申请归还"), 
            this.getRuruen(t, r); else if ("lease_toy_apply_adopt" == t.value) console.log("填写归还"), 
            wx.navigateTo({
                url: "/packageB/member/OrderReturn/OrderReturn?id=" + r.id
            }); else if ("lease_toy_return_info" == t.value) console.log("归还详情"), wx.navigateTo({
                url: "/packageA/others/order_ruturn_info/order_ruturn_info?id=" + r.id
            }); else if ("package_deliver" == t.value) console.log("自提点核销"), console.log(t.api), 
            this.getQrImg(t, r); else if ("expediting_delivery" == t.value) this.publicMessage(t, r, "提醒商家发货"); else if ("snatch_regiment_barter" == t.value) this.setData({
                showBarter: !0,
                showBarter_value: r.barter
            }); else if (53 == t.value) this.getBlindBoxGoods(r.id); else if (56 == t.value) wx.navigateTo({
                url: "/packageH/project_verification/MyProject/MyProject"
            }); else if ("close_reason" == t.value) this.setData({
                refundShow: !0,
                refundText: r.close_reason
            }); else if ("apply_invoice" == t.value) {
                var i = r.has_many_order_goods.map(function(e) {
                    return e.goods_id;
                });
                this.triggerEvent("applyInvoice", {
                    order_item: r,
                    goods_id: i
                });
            } else this.publicMessage(t, r, t.name); else "expediting_delivery" == t.value ? wx.showToast({
                icon: "none",
                title: "已提醒过商家",
                duration: 1e3
            }) : wx.showToast({
                icon: "none",
                title: "error:错误4008820",
                duration: 1e3
            });
        },
        getBlindBoxGoods: function(r) {
            var a = this, o = t.getNetAddresss("plugin.blind-box.api.index.blind-box-goods");
            o += "&order_id=" + this.data.orderPayId, t._getNetWork({
                url: o,
                success: function(t) {
                    var r, o = t.data;
                    1 == o.result ? a.setData((e(r = {}, "blindBoxInfo.show", !0), e(r, "blindBoxInfo.goods", o.data.order), 
                    r)) : wx.showToast({
                        icon: "none",
                        title: o.msg,
                        duration: 1200
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        blindBoxInfoTap: function() {
            this.setData(e({}, "blindBoxInfo.show", !1));
        },
        goOrderList: function(e) {
            console.log(e);
            var t = e.currentTarget.dataset.item.id, r = this.data.orderType;
            wx.navigateTo({
                url: "/packageA/member/orderdetail/orderdetail?order_id=" + t + "&orderType=" + r
            });
        },
        confirmBarter: function() {
            var e = t.getNetAddresss("plugin.snatch-regiment.api.order.barter");
            e += "&order_id=" + this.data.orderPayId, t._getNetWork({
                url: e,
                success: function(e) {
                    var t = e.data;
                    1 == t.result ? (wx.showToast({
                        title: "易货兑换成功",
                        icon: "success",
                        duration: 1500,
                        success: function() {}
                    }), that.getdata()) : wx.showToast({
                        icon: "none",
                        title: t.msg,
                        duration: 1200
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        cancelBarter: function() {
            this.setData({
                showBarter: !1,
                showBarter_value: null
            });
        },
        getQrImg: function(e, r) {
            var a = this, o = t.getNetAddresss(e.api);
            "package_deliver" == e.value ? o += "&order_id=" + r.id : o += "&order_pay_id=" + r.id, 
            t._getNetWork({
                url: o,
                success: function(e) {
                    var t = e.data;
                    1 == t.result ? a.setData({
                        showQrcode: !0,
                        qrcode_url: t.data.qr_code_url
                    }) : wx.showToast({
                        icon: "none",
                        title: t.msg,
                        duration: 1e3
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        publicMessage: function(e, r, a) {
            var o = this;
            e.api && wx.showModal({
                title: "提示",
                content: "确定".concat(a, "?"),
                success: function(r) {
                    if (r.confirm) {
                        var i = "";
                        i += t.getNetAddresss(e.api), i += "&order_id=" + o.data.orderPayId, t._getNetWork({
                            url: i,
                            success: function(e) {
                                var t = e.data;
                                1 == t.result ? (o.triggerEvent("ConfrimOrderNotification", "pay"), wx.showToast({
                                    icon: "success",
                                    title: "".concat(a, "成功"),
                                    duration: 1e3
                                })) : wx.showToast({
                                    icon: "none",
                                    title: t.msg,
                                    duration: 1e3
                                });
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    }
                }
            });
        },
        onClose: function() {
            this.setData({
                showQrcode: !1
            });
        },
        _checklogistics: function(e, t) {
            console.log(e, t), 0 == e.is_all_send_goods ? wx.navigateTo({
                url: "/packageA/member/order/logistics/logistics?id=" + e.id + "&api=" + t.api
            }) : wx.navigateTo({
                url: "/packageE/multiplePackages/multiplePackages?id=" + e.id + "&api=" + t.api
            });
        },
        getRuruen: function(e, r) {
            var a = this, o = t.getNetAddresss(e.api);
            o += "&order_id=" + r.id, t._getNetWork({
                url: o,
                success: function(e) {
                    var t = e.data;
                    1 == t.result ? (wx.showToast({
                        title: t.msg,
                        icon: "none",
                        duration: 1500
                    }), a.triggerEvent("ConfrimOrderNotification")) : wx.showToast({
                        icon: "none",
                        title: t.msg,
                        duration: 1e3
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        _deleteOrder: function(e, t, r) {
            var a = this;
            wx.showModal({
                title: "提示",
                content: "确定删除此订单?",
                success: function(o) {
                    if (o.confirm) {
                        var i = a.data.datasource;
                        i.splice(r, 1), a.setData({
                            datasource: i
                        }), a._sentRequest(t.api, "&order_id=" + e.id, !1);
                    }
                }
            });
        },
        _sentRequest: function(e, r, a) {
            var o = t.getNetAddresss(e);
            o += r, t._getNetWork({
                url: o,
                success: function(e) {
                    var t = e.data;
                    1 == t.result ? wx.showToast({
                        title: t.msg,
                        icon: "none",
                        duration: 1500,
                        success: function() {
                            setTimeout(function() {
                                wx.navigateBack({
                                    delta: 1
                                });
                            }, 1500);
                        }
                    }) : wx.showToast({
                        icon: "none",
                        title: t.msg,
                        duration: 1e3
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        _comment: function(e, t) {
            wx.navigateTo({
                url: "/packageB/comment/comment?order=" + JSON.stringify(e || {})
            });
        },
        _toPay: function(e, t) {
            "107" != e.plugin_id ? wx.navigateTo({
                url: "/packageD/buy/orderPay/orderPay?order_id=" + e.id + "&status=1&api=" + t.api
            }) : wx.navigateTo({
                url: "/packageD/buy/orderPay/orderPay?order_id=" + e.id + "&status=1&api=" + t.api + "&name=bilndBox"
            });
        },
        _toRefundDetail: function(e, t) {
            wx.navigateTo({
                url: "/packageD/member/myOrder/Aftersales/Aftersales?refund_id=" + e.refund_id
            });
        },
        _toRefund: function(e, t) {
            "107" != e.plugin_id ? "snatch_regiment_refund" == t.value ? wx.navigateTo({
                url: "/packageD/member/myOrder/refund/refund?order_id=" + e.id + "&type=3"
            }) : wx.navigateTo({
                url: "/packageD/member/myOrder/refund/refund?order_id=" + e.id + "&type=1"
            }) : wx.navigateTo({
                url: "/packageD/member/myOrder/refund/refund?order_id=" + e.id + "&type=1&value=" + t.value
            });
        },
        _cancleOrder: function(e, t, r) {
            var a = this;
            wx.showModal({
                title: "提示",
                content: "确定取消此订单?",
                success: function(o) {
                    if (o.confirm) {
                        var i = a.data.datasource;
                        i.splice(r, 1), a.setData({
                            datasource: i
                        }), a._sentRequest(t.api, "&order_id=" + e.id, !1);
                    }
                }
            });
        },
        _confirmOrder: function(e, t) {
            var r = this;
            console.log(e, this.data.custom_receipt_confirmation_html), 0 != e.plugin_id && 44 != e.plugin_id || "" === this.data.custom_receipt_confirmation_html ? wx.showModal({
                title: "提示",
                content: "您确定收到货物?",
                success: function(a) {
                    a.confirm && r._confirmOrder_request(e, t);
                }
            }) : this.setData({
                custom_receipt_confirmation_btn: t,
                custom_receipt_confirmation_item: e,
                custom_receipt_confirmation_show: !0
            });
        },
        CustomReceiptConfirmationSend: function() {
            this._confirmOrder_request(this.data.custom_receipt_confirmation_item, this.data.custom_receipt_confirmation_btn);
        },
        _confirmOrder_request: function(e, r) {
            var a = this, o = t.getNetAddresss(r.api);
            o += "&order_id=" + e.id, t._getNetWork({
                url: o,
                success: function(r) {
                    var o = r.data;
                    1 == o.result ? a.triggerEvent("ConfrimOrderNotification", e.id) : t.tips(o.msg);
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        _cashPayOrder: function(e, t) {
            var r = this;
            wx.showModal({
                title: "提示",
                content: "确定此订单已付款?",
                success: function(a) {
                    a.confirm && r._sentRequest(t.api, "&order_id=" + e.id + "&order_pay_id=" + r.data.order_pay_id, !1);
                }
            });
        },
        _verification: function(e, t) {
            wx.navigateTo({
                url: "/packageD/member/myOrder/orderVerification/orderVerification?order_id=" + e.id + "&api=" + t.api
            });
        },
        _verificationCash: function(e, t) {
            var r = this;
            wx.showModal({
                title: "提示",
                content: "确定此订单已付款?",
                success: function(a) {
                    a.confirm && r._sentRequest(t.api, "&order_id=" + e.id + "&order_pay_id=" + r.data.order_pay_id, !1);
                }
            });
        },
        _payMoney: function(e, r) {
            var a = this;
            wx.showModal({
                title: "提示",
                content: "确认支付该订单?",
                success: function(e) {
                    if (e.confirm) {
                        var o = "";
                        "supplier" == a.data.orderType || "subsidiary" == a.data.orderType || "storeMang" == a.data.orderType ? (o += t.getNetAddresss(r.api), 
                        o += "&order_id=" + a.data.orderPayId) : (o += t.getNetAddresss("plugin.store-cashier.frontend.store.center.order-operation.pay"), 
                        o += "&order_id=" + a.data.orderPayId), t._getNetWork({
                            url: o,
                            success: function(e) {
                                var t = e.data;
                                1 == t.result ? (a.triggerEvent("ConfrimOrderNotification", "pay"), wx.showToast({
                                    icon: "success",
                                    title: "支付成功",
                                    duration: 1e3
                                })) : wx.showToast({
                                    icon: "none",
                                    title: t.msg,
                                    duration: 1e3
                                });
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    }
                }
            });
        },
        _getCompany: function() {
            var e = this, r = "";
            "supplier" == e.data.orderType ? r += t.getNetAddresss("plugin.supplier.frontend.order.express-company") : "subsidiary" == e.data.orderType ? r += t.getNetAddresss("plugin.subsidiary.frontend.order.express-company") : "storeMang" == e.data.orderType ? r += t.getNetAddresss("plugin.shop-assistant.frontend.order.expressCompanies") : r += t.getNetAddresss("plugin.store-cashier.frontend.store.center.sendOrder"), 
            r += "&order_id=" + e.data.orderPayId, t._getNetWork({
                url: r,
                success: function(r) {
                    var a = r.data;
                    if (1 == a.result) {
                        e.setData({
                            options: a.data.express_companies
                        });
                        var o = e.data.options.map(function(e) {
                            return e.name;
                        });
                        t._isTextEmpty(a.data.jurisdiction_set) || e.setData({
                            jurisdiction_set: a.data.jurisdiction_set
                        }), e.setData({
                            columns: o,
                            addresseeInfo: a.data.address
                        });
                    }
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        _deliverGoodsCancel: function(e, r) {
            var a = this;
            wx.showModal({
                title: "提示",
                content: "确定取消发货?",
                success: function(e) {
                    if (e.confirm) {
                        var o = "";
                        "supplier" == a.data.orderType || "subsidiary" == a.data.orderType || "storeMang" == a.data.orderType ? (o += t.getNetAddresss(r.api), 
                        o += "&order_id=" + a.data.orderPayId) : "auction" == a.data.orderType ? (o += t.getNetAddresss("plugin.auction.api.order-operation.cancel-send"), 
                        o += "&order_id=" + a.data.orderPayId) : (o += t.getNetAddresss("plugin.store-cashier.frontend.store.center.order-operation.cancel-send"), 
                        o += "&order_id=" + a.data.orderPayId), t._getNetWork({
                            url: o,
                            success: function(e) {
                                var t = e.data;
                                1 == t.result ? (a.triggerEvent("ConfrimOrderNotification", "pay"), wx.showToast({
                                    icon: "success",
                                    title: "取消发货成功",
                                    duration: 1e3
                                })) : wx.showToast({
                                    icon: "none",
                                    title: t.msg,
                                    duration: 1e3
                                });
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    }
                }
            });
        },
        _collectGoods: function(e, r) {
            var a = this;
            wx.showModal({
                title: "提示",
                content: "确认收货?",
                success: function(e) {
                    if (e.confirm) {
                        var o = "";
                        "supplier" == a.data.orderType || "subsidiary" == a.data.orderType || "pickup_card" == a.data.orderType || "picking-card-one" == a.data.orderType || "storeMang" == a.data.orderType ? (o += t.getNetAddresss(r.api), 
                        o += "&order_id=" + a.data.orderPayId) : (o += t.getNetAddresss("plugin.store-cashier.frontend.store.center.order-operation.receive"), 
                        o += "&order_id=" + a.data.orderPayId), t._getNetWork({
                            url: o,
                            success: function(e) {
                                var t = e.data;
                                1 == t.result ? (a.triggerEvent("ConfrimOrderNotification", "pay"), wx.showToast({
                                    icon: "success",
                                    title: "收货成功",
                                    duration: 1e3
                                })) : wx.showToast({
                                    icon: "none",
                                    title: t.msg,
                                    duration: 1e3
                                });
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    }
                }
            });
        },
        _closeOrderPay: function(e, r) {
            var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "", o = this;
            wx.showModal({
                title: "提示",
                content: a || "确定关闭订单?",
                success: function(e) {
                    if (e.confirm) {
                        var a = "";
                        "supplier" == o.data.orderType || "subsidiary" == o.data.orderType || "storeMang" == o.data.orderType ? (a += t.getNetAddresss(r.api), 
                        a += "&order_id=" + o.data.orderPayId) : (a += t.getNetAddresss("plugin.store-cashier.frontend.store.center.order-operation.close"), 
                        a += "&order_id=" + o.data.orderPayId, a += "&shop_id=null"), t._getNetWork({
                            url: a,
                            success: function(e) {
                                var t = e.data;
                                1 == t.result ? (o.triggerEvent("ConfrimOrderNotification", "pay"), wx.showToast({
                                    icon: "success",
                                    title: "关闭订单成功",
                                    duration: 1e3
                                })) : wx.showToast({
                                    icon: "none",
                                    title: t.msg,
                                    duration: 1e3
                                });
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    }
                }
            });
        },
        _evaluate: function(e, t) {
            wx.navigateTo({
                url: "/packageD/member/myOrder/DeliveryEvaluate/DeliveryEvaluate?order_id=" + e.order_id + "&api=" + t.api + "&name=distributor"
            });
        },
        _truckList: function(e, t) {
            wx.navigateTo({
                url: "/packageD/member/myOrder/truckList/truckList?order_id=" + t.id
            });
        },
        _checkInvoice: function(e, t) {
            wx.navigateTo({
                url: "/packageD/member/myOrder/invoice/invoice?order_id=" + t.id
            });
        },
        numberNamebtn: function(e) {
            var t = e.detail.value;
            this.setData({
                numberName: t
            });
        },
        sendGoogs: function(e) {
            var r = this;
            if (e && "confirm" !== e.detail) this.setData({
                dialogVisible: !1
            }), this.triggerEvent("stoprefresh", !1); else {
                var a = this, o = function(e) {
                    r.setData({
                        sendGoogsFail: {
                            show: !0,
                            msg: e
                        },
                        dialogVisible: !1
                    });
                };
                if ("supplier" == this.data.orderType) {
                    var i = "";
                    i += t.getNetAddresss("plugin.supplier.frontend.order.send");
                    var s = {
                        order_id: a.data.orderPayId,
                        express_code: a.data.expressName.value,
                        express_company_name: a.data.expressName.name,
                        express_sn: a.data.numberName
                    };
                    t._postNetWork({
                        url: i,
                        showToastIn: !1,
                        data: s,
                        success: function(e) {
                            var t = e.data;
                            console.log("msg=", t), 1 == t.result ? (a.setData({
                                dialogVisible: !1
                            }), a.triggerEvent("stoprefresh", !1), a.triggerEvent("ConfrimOrderNotification", "pay"), 
                            wx.showToast({
                                icon: "success",
                                title: "发货成功",
                                duration: 1e3
                            })) : o(t.msg);
                        },
                        fail: function(e) {}
                    });
                } else if ("subsidiary" == this.data.orderType) {
                    var n = "";
                    n += t.getNetAddresss("plugin.subsidiary.frontend.order.send");
                    var d = {
                        order_id: a.data.orderPayId,
                        express_code: a.data.expressName.value,
                        express_company_name: a.data.expressName.name,
                        express_sn: a.data.numberName
                    };
                    t._postNetWork({
                        url: n,
                        showToastIn: !1,
                        data: d,
                        success: function(e) {
                            var t = e.data;
                            1 == t.result ? (a.setData({
                                dialogVisible: !1
                            }), a.triggerEvent("stoprefresh", !1), a.triggerEvent("ConfrimOrderNotification", "pay"), 
                            wx.showToast({
                                icon: "success",
                                title: "发货成功",
                                duration: 1e3
                            })) : o(t.msg);
                        },
                        fail: function(e) {}
                    });
                } else if ("auction" == this.data.orderType || "storeMang" == this.data.orderType) {
                    var c = "";
                    c = t.getNetAddresss("plugin.auction.api.order-operation.send"), "storeMang" == this.data.orderType && (c += t.getNetAddresss("plugin.shop-assistant.frontend.order.send"));
                    var u = {
                        order_id: a.data.orderPayId,
                        express_code: a.data.expressName.value,
                        express_company_name: a.data.expressName.name,
                        express_sn: a.data.numberName
                    };
                    t._postNetWork({
                        url: c,
                        showToastIn: !1,
                        data: u,
                        success: function(e) {
                            var t = e.data;
                            1 == t.result ? (a.setData({
                                dialogVisible: !1
                            }), a.triggerEvent("stoprefresh", !1), a.triggerEvent("ConfrimOrderNotification", "pay"), 
                            wx.showToast({
                                icon: "success",
                                title: "发货成功",
                                duration: 1e3
                            })) : o(t.msg);
                        },
                        fail: function(e) {}
                    });
                } else {
                    var l = "";
                    l += t.getNetAddresss("plugin.store-cashier.frontend.store.center.order-operation.send"), 
                    l += "&order_id=" + a.data.orderPayId, l += "&express_code=" + a.data.expressName.value, 
                    l += "&express_company_name=" + a.data.expressName.name, l += "&express_sn=" + a.data.numberName, 
                    t._getNetWork({
                        url: l,
                        success: function(e) {
                            var t = e.data;
                            1 == t.result ? (console.log("result=", t.result), a.triggerEvent("ConfrimOrderNotification", "pay"), 
                            wx.showToast({
                                icon: "success",
                                title: "发货成功",
                                duration: 1e3
                            }), a.setData({
                                dialogVisible: !1
                            })) : o(t.msg);
                        },
                        fail: function(e) {}
                    });
                }
            }
        },
        colseSendGoogsFailPopup: function() {
            this.setData({
                "sendGoogsFail.show": !1
            });
        },
        seleRegional: function() {
            this.setData({
                dateshow_1: !0
            });
        },
        onCancelbtn: function() {
            this.setData({
                dateshow_1: !1,
                inputExpressCompanyName: "",
                filterExpressCompanys: []
            });
        },
        onConfirmbtn: function(e) {
            var t = this, r = e.detail.index, a = e.detail.value, o = this.data.options.filter(function(e) {
                return -1 !== e.name.indexOf(t.data.inputExpressCompanyName);
            });
            this.setData({
                dateshow_1: !1,
                regional: a,
                expressName: o[r],
                inputExpressCompanyName: "",
                filterExpressCompanys: []
            });
        },
        noop: function() {},
        confirmHotelOrder: function(e, r) {
            var a = "";
            a += t.getNetAddresss(e), a += "&order_id=" + r, t._getNetWork({
                url: a,
                success: function(e) {
                    var t = e.data;
                    t.result, wx.showToast({
                        icon: "none",
                        title: t.msg,
                        duration: 1e3
                    });
                },
                fail: function(e) {
                    console.log(e);
                }
            });
        },
        copyorderbtn: function(e) {
            var t = e.currentTarget.dataset.copydata;
            wx.setClipboardData({
                data: t || "",
                success: function(e) {
                    wx.showToast({
                        icon: "none",
                        title: "复制成功",
                        duration: 1e3
                    });
                }
            });
        },
        onCloseRefundShow: function() {
            this.setData({
                refundShow: !1
            });
        }
    }
});